package com.dy.design_pattern_study.chain_of_responsibility_pattern.dome3;

import lombok.Setter;

/**
 * @CreateBy zhangdingyi
 * @Date 2023-04-22
 * @Content 管理者类
 */
public abstract class Manager {

    protected String name;

    //管理者上级
    @Setter
    protected Manager superior;

    public Manager(String name) {
        this.name = name;
    }

    /**
     * 打印通用模板
     * @param request
     * @return
     */
    protected String showBaseMessage(Request request){
        String message =
        "名字：" + name +
                ",内容：" + request.getRequestContent() +
                ",数量：" + request.getNumber();
        return message;
    }

    //申请请求
    abstract public void resultApplications(Request request);
}
